package jhelper;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
import java.io.*;
/**
 *
 * @author Administrator
 */
class writeFileDemo {
    public static void main(String[] args) throws FileNotFoundException {
        File file =new File ("text.txt");
        FileOutputStream f=new FileOutputStream(file, true);
        PrintWriter p=new PrintWriter(f,true);
        p.println("hello");
        System.out.println("你已经成功向文件添加了一行数据");
    }

}
